package com.bchun.gamepk.model;

import java.io.Serializable;
import java.util.List;

/**
 * <pre>
 * FutureSoftware
 * 
 * File: Page.java
 * 
 * Copyright (C) By PeterFeng at 2013
 * 
 * Description: 
 * 
 * Notes:
 * 
 * Revision History
 * Date          Name         Desc
 * 2013年9月20日         PeterFeng    Initial design
 * 
 * </pre>
 */
public class Page<T> implements Serializable {

	private static final long serialVersionUID = 3267317913505867773L;

	private int currentPage = 1;
	private int pageSize = 20;
	private int totalSize = 0;
	private int totalPage = 1;
	private List<T> root;
	private Object conditions;

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotalSize() {
		return totalSize;
	}

	public void setTotalSize(int totalSize) {
		this.totalSize = totalSize;
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public int getStart() {
		return (currentPage - 1) * pageSize;
	}

	public int getEnd() {
		return currentPage * pageSize;
	}

	public List<T> getRoot() {
		return root;
	}

	public void setRoot(List<T> root) {
		this.root = root;
	}

	public void setConditions(Object conditions) {
		this.conditions = conditions;
	}

	public Object getConditions() {
		return conditions;
	}

}
